<?php
set_include_path('../:' . get_include_path());

require_once 'Services/Plazes.php';

$username = '';
$password = '';

try {
    $params = array(
        'name' => 'Services_Plazes',
        'city' => 'Berlin',
        'country' => 'Germany');

    $plazes = Services_Plazes::factory(
        $username,
        $password,
        'https://sandbox.plazes.com');

    var_dump($plazes->plazes->createPlaze($params));

} catch (Services_Plazes_Adapter_Plazes_Exception $e) {
    echo 'Error fetching info: ' . $e->getMessage();
} catch (Services_Plazes_Exception $e) {
    echo 'SPE Exception: ' . $e->getMessage();
} catch (Exception $e) {
    echo 'PHP Exception: ' . $e;
}
?>
